<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<%@ include file="/WEB-INF/views/include/head.jsp"%>
<script type="text/javascript">
	$(document).ready(function() {
		$("input").attr("disabled", "disabled");
		$("textarea").attr("readonly", "readonly");
		$("#back").attr("disabled", "");
	});
</script>
</head>
<body class="ContentBody">
	<form action="${ctx}/WeiXiu/save" method="post" id="weiXiuForm"
		enctype="multipart/form-data">
		<input type="hidden" name="weiXiuId" value="${obj.weixiu.weiXiuId }" />
		<input type="hidden" name="dingDanHao"
			value="${obj.weixiu.dingDanHao }" />
		<tr>
			<td height="30">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td height="62" background="${ctxStatic}/images/nav04.gif">
							<!--  -->
							<table width="98%" border="0" align="center" cellpadding="0"
								cellspacing="0">
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<div class="MainDiv">
			<table width="99%" border="0" cellpadding="0" cellspacing="0"
				class="CContent">
				<tr>
					<th class="tablestyle_title">维修单查看页面</th>
				</tr>
				<tr>
					<td class="CPanel">
				<TR>
					<TD width="100%">
						<fieldset style="height: 100%;">
							<legend>维修单</legend>
							<table border="0" cellpadding="2" cellspacing="1"
								style="width: 100%">
								<tr>
									<td nowrap align="right" width="13%">维修单编号:</td>
									<td width="41%"><input id="dingDanHao" name="dingDanHao"
										class="text required" type="text"
										value="${obj.weixiu.dingDanHao}" /></td>
									<td align="right" width="19%">录入人:</td>
									<td width="27%"><input id="luRuRen" name="luRuRen"
										class="text required" type="text"
										value="${obj.weixiu.luRuRen}" disabled="disabled" /></td>
								</tr>
								<tr>
									<td nowrap align="right" width="13%">维修人员:</td>
									<td width="41%"><input id="weiXiuRen" name="weiXiuRen"
										class="text required" type="text"
										value="${obj.weixiu.weiXiuRen}" /></td>
									<td align="right" width="19%">品牌名:</td>
									<td width="27%"><input id="pingPaiHao" name="pingPaiHao"
										class="text required" type="text"
										value="${obj.weixiu.pingPaiHao}" disabled="disabled" /></td>
								</tr>
								<tr>
									<td nowrap align="right" width="13%">用户地址:</td>
									<td width="41%"><input id="yongHuDiZhi" name="yongHuDiZhi"
										class="text required" type="text"
										value="${obj.weixiu.yongHuDiZhi}" /></td>
									<td nowrap align="right" width="13%">品牌型号:</td>
									<td width="27%"><input name="pingPaiXingHao"
										id="pingPaiXingHao" class="text required" type="text"
										value="${obj.weixiu.pingPaiXingHao}" /></td>
								</tr>
								<tr>
									<td nowrap align="right" width="13%">用户电话:</td>
									<td width="41%"><input id="yongHuPhone" name="yongHuPhone"
										class="text required" type="text"
										value="${obj.weixiu.yongHuPhone}" /></td>
									<td align="right" width="19%">购买日期:</td>
									<td width="27%"><input name="gouMaiRiQi" id="gouMaiRiQi"
										class="text required" type="text"
										value="${obj.weixiu.gouMaiRiQi}" /></td>
								</tr>
								<tr>
									<td align="right" width="19%">用户姓名:</td>
									<td width="41%"><input id="yongHuName" name="yongHuName"
										class="text required" type="text"
										value="${obj.weixiu.yongHuName}" /></td>
									<td align="right" width="19%">条码:</td>
									<td width="27%"><input name="tiaoMa" id="tiaoMa"
										class="text" style="width: 240px;" type="text"
										value="${obj.weixiu.tiaoMa}" /></td>
								</tr>
								<tr>
									<td nowrap align="right" width="13%">是否维修:</td>
									<td width="41%"><input name="zhuangTai"
										class="text required" type="radio" value="1" checked="checked" />未维修&nbsp;&nbsp;&nbsp;&nbsp;<input
										name="zhuangTai" class="text required" type="radio" value="2"
										<c:if test="${ obj.weixiu.zhuangTai == 2}">checked="checked"</c:if> />已维修</td>
									<td nowrap align="right" width="13%">外机条码:</td>
									<td width="27%"><input name="waiJiTiaoMa" id="waiJiTiaoMa"
										style="width: 240px;" class="text" type="text"
										value="${obj.weixiu.waiJiTiaoMa}" /></td>
								</tr>
								<tr>
									<td nowrap align="right" width="13%">保修类型:</td>
									<td width="41%"><input name="baoXiuLeiXing"
										class="text required" type="radio" value="1" checked="checked" />保修内&nbsp;&nbsp;&nbsp;&nbsp;<input
										name="baoXiuLeiXing" class="text required" type="radio"
										value="2"
										<c:if test="${ obj.weixiu.baoXiuLeiXing == 2}">checked="checked"</c:if> />保修外</td>
									<td nowrap align="right" width="13%">图片1:</td>
									<td width="27%"><c:if
											test="${obj.weixiu.tuPian1 != null && obj.weixiu.tuPian1 != ''}">
											<a href="${ctx}/upload/${obj.weixiu.tuPian1}" target="_blank">图片1</a>
										</c:if></td>
								</tr>
								<tr>
									<td nowrap align="right" width="13%">拉修费用:</td>
									<td width="41%"><input id="laXiuFeiYong"
										name="laXiuFeiYong" class="text" type="text"
										value="${obj.weixiu.laXiuFeiYong}" /></td>
									<td align="right" width="19%">图片2:</td>

									<td width="27%"><c:if
											test="${obj.weixiu.tuPian2 != null && obj.weixiu.tuPian2 != ''}">
											<a href="${ctx}/upload/${obj.weixiu.tuPian2}" target="_blank">图片2</a>
										</c:if></td>
								</tr>
								<tr>
									<td align="right" width="19%">维修费用:</td>
									<td width="41%"><input id="weiXiuFei" name="weiXiuFei"
										class="text" type="text" value="${obj.weixiu.weiXiuFei}" /></td>
									<td align="right" width="19%">图片3:</td>
									<td width="27%"><c:if
											test="${obj.weixiu.tuPian3 != null && obj.weixiu.tuPian3 != ''}">
											<a href="${ctx}/upload/${obj.weixiu.tuPian3}" target="_blank">图片2</a>
										</c:if></td>
								</tr>
								<tr>
									<td nowrap align="right" width="13%">故障原因:</td>
									<td width="41%"><textarea rows="5" name="guZhangYuanYin">${obj.weixiu.guZhangYuanYin}</textarea>
									</td>
									<td align="right" width="19%">维修措施:</td>
									<td width="27%"><textarea rows="5" name="weiXiuCuoShi">${obj.weixiu.weiXiuCuoShi}</textarea>
									</td>
								</tr>
								<tr>
									<td colspan="4" align="center"><font color="red" id="mima"></font></td>
								</tr>
							</table>
							<br />
							<c:if test="${obj.weixiu.wuLiaos.size() ne 0}">
								<table width="50%" border="0.5" id="wuliao"
									style="margin: auto;">
									<tr class="CTitle">
										<td height="22" colspan="4" align="center"
											style="font-size: 16px">配件列表</td>
									</tr>

									<tr bgcolor="#EEEEEE">
										<td width="33%" align="center">物料单号</td>
										<td width="33%" align="center">配件名称</td>
										<td width="33%" align="center">物料号</td>
										<td width="33%" align="center">数量</td>
									</tr>

									<c:forEach items="${obj.weixiu.wuLiaos}" var="wuLiao"
										varStatus="status">
										<input type="hidden"
											name="weixiu.wuLiaos[${status.index}].wuLiaoId"
											value="${wuLiao.wuLiaoId}" />
										<tr>
										   <td><input type="text"
											name="weixiu.wuLiaos[${status.index}].wuLiaoDanHao"
											value="${wuLiao.wuLiaoDanHao}" class="text required" /></td>
											<td><input type="text"
												name="weixiu.wuLiaos[${status.index}].peiJianMing"
												value="${wuLiao.peiJianMing}" class="text required" /></td>
											<td><input type="text"
												name="weixiu.wuLiaos[${status.index}].wuLiaoBianHao"
												value="${wuLiao.wuLiaoBianHao}" class="text required" /></td>
											<td><input type="text"
												name="weixiu.wuLiaos[${status.index}].shuLiang"
												value="${wuLiao.shuLiang}" class="text required" /></td>
										</tr>
									</c:forEach>
								</table>
							</c:if>
						</fieldset>
					</TD>
				</TR>
				</td>
				</tr>
				<TR>
					<TD colspan="2" align="center" height="80px"><a 
						name="back" href="#" onclick="window.history.go(-2);" style="font-size: 22px">返回</a></TD>
				</TR>
			</TABLE>
			</td>
			</tr>
			</table>
		</div>
	</form>

</body>
</html>
